package cn.gyxy.controller;

import cn.gyxy.pojo.Rizhi;
import cn.gyxy.service.RizhiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/lgbs")
public class RizhiController {

    @Autowired
    private RizhiService rizhiService;

    @RequestMapping("/rizhiChaxun")
    public String rizhiChaxun(Model model){
   List<Rizhi> list= rizhiService.selectRizhi();
   model.addAttribute("list", list);
        return "rizhiChaxun";

    }
}
